import type { App } from "vue";

import { hasPerm } from "./permission";

import { tableHeight } from "./tableHeight";

// 全局注册 directive
export function setupDirective(app: App<Element>) {
  // 使 v-hasPerm 在所有组件中都可用   v-hasPerm="['sys:config:add']"
  app.directive("hasPerm", hasPerm);

  // v-tableHeight="{ bottom: 100 }"
  app.directive("tableHeight", tableHeight);
}
